#include <iostream>
/**
 * @brief 快速排序
 */
using namespace std;
int arr[1000005];
void mysort(int a[], int l, int r) {
    if (l >= r) return ;
    int mid = a[l + r + 1 >> 1], i = l - 1, j = r + 1;
    while (true) {
        while (a[i ++] < mid) ;
        while (a[j --] > mid) ;
        if (i < j) a[i] ^= a[j] ^= a[i] ^= a[j];
        else break;
    }
    mysort(a, i, r);
    mysort(a, l, i - 1);
}
signed main() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; ++ i) cin >> arr[i];
    mysort(arr, 1, n);
    for (int i = 1; i <= n; ++ i) cout << arr[i] << ' ';
    return 0;
}